﻿using System;

namespace Songhay.Extensions
{
    /// <summary>
    /// Extensions of <see cref="System.Object"/>.
    /// </summary>
    public static class ObjectExtensions
    {
        /// <summary>
        /// Boxes the value in object or returns <see cref="System.DBNull"/>.
        /// </summary>
        /// <param name="objectOfDomain">The object of domain.</param>
        /// <returns></returns>
        public static object ToObjectOrDBNull(this object objectOfDomain)
        {
            return objectOfDomain ?? DBNull.Value;
        }
    }
}
